`include "Add16.v"
module Add16_tb;
    reg [15:0] a, b;
    wire [15:0] sum;
    wire cout;
    Add16 add16(a, b, 1'b0, sum, cout);

    initial begin
        // 测试用例1: 0 + 0 = 0
        a = 16'h0000;
        b = 16'h0000;
        #10;
        
        // 测试用例2: 1 + 1 = 2
        a = 16'h0001;
        b = 16'h0001;
        #10;
        
        // 测试用例3: 255 + 1 = 256 (测试进位)
        a = 16'h00FF;
        b = 16'h0001;
        #10;
        
        // 测试用例4: 最大值相加 (测试溢出)
        a = 16'hFFFF;
        b = 16'h0001;
        #10;
        
        // 测试用例5: 大数相加
        a = 16'h1234;
        b = 16'h5678;
        #10;
        
        $finish;
    end
    
    initial begin
        $monitor("Time=%0t: a=%h, b=%h, sum=%h, cout=%b", $time, a, b, sum, cout);
    end
endmodule       